package com.novellotus.iov.carvice.model;

import android.support.v4.widget.DrawerLayout;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.novellotus.iov.carvice.R;
import com.novellotus.iov.carvice.activity.MainActivityOld;
import com.novellotus.iov.carvice.utils.GlideCircleTransform;

/**
 * Created by Rich on 2017/7/6.
 */

public class MainActivityModel {

    private MainActivityOld activity;

    public MainActivityModel(MainActivityOld activity) {
        this.activity = activity;
    }

    public void initImage(final ImageView imageView) {
        //带白色边框的圆形图片加载
        Glide.with(activity).load(R.mipmap.icon_head)
               // .transform(new GlideCircleTransform(activity))
                .into(imageView);
    }

    public DrawerLayout.SimpleDrawerListener mSimpleDrawerListener = new DrawerLayout.SimpleDrawerListener() {
        @Override
        public void onDrawerOpened(View drawerView) {
            //档DrawerLayout打开时，让整体DrawerLayout布局可以响应点击事件

        }

        @Override
        public void onDrawerClosed(View drawerView) {
            super.onDrawerClosed(drawerView);
        }
    };
}
